1. Field of the Invention
The present invention relates to a data communication apparatus which carries out data communication in a communication network constituted by a plurality of information apparatuses, and method thereof, and more particularly, to a data communication apparatus which achieves higher efficiency in using the media, and method thereof.
2. Description of the Background Art
In a network in which a plurality of apparatuses transmit to and receive data from each other, a method of obtaining transmission right to "communication medium (media)", whether it is cable or wireless, shared among those apparatuses is predetermined, and the method is applied to those apparatuses, whereby disturbance of communication has been prevented. In addition, efficiency in using the media has been improved.
An example which implements such efforts as described above is disclosed, for example, in Japanese Patent Laying-Open No. 5-260051. A method of intensively managing an access right to the media is suggested in the document. In this method, however, no communication could be carried out if an apparatus for intensive management of an access right has a trouble. Furthermore, if an additional apparatus which shares the same media is provided, the apparatus must be registered additionally in the apparatus for intensive management of access right. In the case of wireless media, in particular, it is difficult to apply that method since the number of apparatuses which operate independently changes dynamically.
In order to avoid these problems, the following two methods have been disclosed in which an access right to the media is not managed intensively to allow each apparatus to access the media autonomously and cooperatively.
One of the methods is disclosed in the U.S. Pat. No. 4,661,902 ("Local Area Network with Carrier Sense Collision Avoidance", Apr. 28, 1987) by Hochsprung et al. (Apple Computer, Inc.). Although this method is essentially applied to a cable system network apparatus, it can be applied to a wireless system network apparatus. This method is hereinafter referred to as "conventional example A".
The other is disclosed in the U.S. Pat. No. 5,231,634 ("Medium Access Protocol for Wireless LANs", Jul. 27, 1993) by Giles et al. (Proxim, Inc.). This method is applied to a wireless system network apparatus. The method is hereinafter referred to as "conventional example P".
FIG. 16 is a schematic diagram showing transmission and reception of a packet when an apparatus A transmits data to an apparatus B which shares the media with apparatus A. Operation of conventional examples A and P will now be described with reference to FIG. 16. Basically, the same procedure of FIG. 16 which will be described below is carried out in both conventional examples A and P.
(1) Apparatus A which desires to transmit data checks if the media are in use (senses a carrier) and inhibits data transmission if in use (carrier sense step).
(2) Apparatus A transmits an RTS (Request To Send) packet 20 to the media. RTS packet 20 includes addresses of apparatus A itself and receiving apparatus B (RTS transmission step).
(3) Apparatus B which shares the media with apparatus A receives RTS packet 20. Every apparatus which receives RTS packet 20 reads out an address of a receiving apparatus included in RTS packet 20, and compares that address to an address of the apparatus itself. Apparatus B recognizes that the packet is transmitted to the apparatus B itself and transmits a CTS (Clear To Send) packet 21 in response to RTS packet 20. CTS packet 21 includes addresses of apparatus B itself and CTS receiving apparatus A (CTS transmission step). Apparatuses other than apparatus B do not respond to RTS packet 20.
(4) When apparatus A receives CTS packet 21 from apparatus B, apparatus A determines that it can obtain an access right to the media, and transmits to apparatus B a data packet 22 including contents it desires to transmit to apparatus B (data packet transmission step).
(5) (Only in conventional example P) apparatus B transmits an ACK (Acknowledgement) packet to apparatus A to acknowledge reception of the data packet from apparatus A (ACK transmission step).
In both methods, accesses from a plurality of apparatuses to the media may conflict with each other at the time of RTS transmission. In FIG. 17, since RTS packets of apparatus A and B conflict with each other and an apparatus which should respond to those RTS packets cannot receive the RTS packets correctly, the apparatus cannot transmit a CTS packet. Referring to FIG. 17, in this example in which it is assumed that conflict of accesses will occur, since apparatus A does not receive CTS 24 by the time when it should receive it (time out), conflict (collision) of accesses to the media is detected. If collision is detected, apparatus A must carry out the above described process again from the carrier sense step.
Although basic operation of the conventional examples A and P has been described above, difference between examples A and P will now be described.
Conventional example A first carries out a "process of waiting for fixed time", and then, a "process of waiting for random time".
In the "process of waiting for fixed time", a step of sensing a carrier for every 100 milliseconds is repeated four times. If no carrier is sensed, "process of waiting for random time" is next carried out. If a carrier is sensed even once, the step of sensing a carrier is again carried out four times.
In "process of waiting for random time", a random number R determined depending on an access condition of the media is generated, and a step of sensing a carrier for every 100 milliseconds is repeated R times. If no carrier is sensed, an RTS packet is transmitted. If a carrier is sensed even once, process immediately returns to "process of waiting for fixed time".
Referring back to FIG. 16, if it is ensured that each of time from completion of RTS packet 20 transmission to start of CTS packet 21 transmission ("a" in FIG. 16), time from completion of CTS packet 21 transmission to start of data packet 22 transmission ("b" in FIG. 16), and time from completion of data packet 22 transmission to start of ACK packet 23 transmission ("c" in FIG. 16) is well shorter than, for example, 400 milliseconds, no collision would occur during switching of a series of these packets unless RTS packets 20 conflicts with each other. In conventional example A, time "c" is not taken into consideration since a method of ACK packet transmission is not disclosed therein. However, the method of ACK packet transmission is herein added to conventional example A in order to clarify difference between conventional examples A and P which will be described below.
Conventional example A enables prevention of conflict of accesses to the media, and ensures that no collision will occur during transmission of a data packet from apparatus A to apparatus B by the above-described method.
Conventional example P is an improvement of conventional A, which overcomes so called "hidden terminal" problem which is specific to wireless media. In this case, a hidden terminal represents a terminal which cannot transmit to and receive data from a plurality of wireless terminals within a prescribed zone directly. In FIG. 18, apparatuses A and B can communicate with each other and apparatuses B and C can communicate with each other, while apparatuses A and C cannot communicate with each other (in this case, apparatus C is a hidden terminal with respect to apparatus A). In this case, apparatus C cannot detect transmission of a data packet from apparatus A to apparatus B. Therefore, in the method of conventional example A, apparatus C determines that no carrier is present and transmits a packet to apparatus B, and therefore, apparatus B might not receive a data packet from apparatus A correctly.
In order to solve such problems as described above, in conventional example P, an apparatus inhibits transmission of an RTS packet for the time determined by a random number. However, if another apparatus which shares the media therewith receives an RTS packet or a CTS packet which is transmitted not to the apparatus itself, the apparatus considers that a data packet will be sent thereafter, and inhibits transmission of a packet for a while thereafter. In other words, an apparatus which receives an RTS packet which is transmitted not to the apparatus itself inhibits transmission of a packet for a period "d" in FIG. 16, and an apparatus which receives a CTS packet which is transmitted not to the apparatus itself inhibits transmission of a packet for a period "e" in FIG. 16. Since periods "d" and "e" could change depending on a length of a DATA packet, the length of a DATA packet is included in an RTS packet and a CTS packet, and "d" and "e" are calculated by an apparatus which receives an RTS packet and a CTS packet based on the packet length included therein, respectively.
Conventional example P enables prevention of conflict of accesses to the media, and ensures that no conflict will occur during transmission of a data packet from apparatus A to apparatus B, by means of the above described method.
However, conventional examples A and P have the following problems.
(Problem 1)
For example, the following condition will be considered. Apparatuses A, B and C share the media and can communicate with each other, and each of apparatuses A and B alternately requests transmission of 10 data packets to apparatus C. Data packets transmitted by apparatuses A and B are sequentially represented by Pa.sub.0 . . . Pa.sub.9 and Pb.sub.0 . . . Pb.sub.9, respectively.
In both conventional examples A and P, if apparatus B tries to transmit an RTS corresponding to Pb.sub.0 right after apparatus A transmits an RTS packet corresponding to Pa.sub.0, apparatus B senses a carrier and inhibits transmission of RTS. After a period during which apparatus A sends a data corresponding to Pa.sub.0, apparatus A tries transmission of Pa.sub.1 and apparatus B tries re-transmission of Pb.sub.0. However, which apparatus can transmit an RTS packet earlier depends on the case because time is determined by random number. Therefore, apparatus C might receive a packet in the following order.
Pa.sub.0, Pa.sub.1 . . . Pa.sub.9, Pb.sub.0, Pb.sub.1 . . . Pb.sub.9
In the field of the multimedia which has been studied in recent years, if apparatuses A and B send image data and audio data to apparatus C, respectively, and apparatus C reproduces the image data and the audio data as they are, image and audio are not synchronized, and therefore, it is not practical. Therefore, technique to synchronize image data and audio data with each other is required. However, each of these conventional examples A and P has highly disadvantageous characteristic to such a synchronization. Thus, in the conventional examples, since an apparatus inhibits transmission of an RTS packet for the time defined by a random number, apparatus C can not receive a packet in such an order as Pa.sub.0, Pb.sub.0, Pa.sub.1, Pb.sub.1 . . . Pa.sub.9, Pb.sub.9.
(Problem 2)
In conventional example P, an apparatus which has received an RTS packet assumes that a series of data switching is carried out between other apparatuses and gives up obtaining the media during the data switching. However, even if an apparatus which should receive that RTS packet is not ready to receive data, the apparatus which has received the RTS packet assumes that a series of data switching is being carried out and gives up obtaining the media during the data switching, resulting in reduction in efficiency in using the media.
This condition will now be described with reference to FIG. 19. FIG. 19 shows a condition of communication when apparatuses which are adjacent to each other share the media. Referring to FIG. 19, apparatuses A and B can communicate with each other, apparatuses B and C can communicate with each other, and apparatuses C and D can communicate with each other, while other combination of apparatuses cannot carried out communication.
It is now assumed that apparatus A is not ready to receive data when apparatus B desires to communicate with apparatus A. In conventional example P, apparatus C which has received an RTS packet 51 transmitted according to this request of apparatus B considers that a CTS packet 52, a data packet 53 and an ACK packet 54 are transmitted between apparatuses A and B, and sets a packet transmission inhibition period 55, i.e., a period during which a packet is inhibited from being transmitted. Thus, apparatus C cannot return a CTS packet to apparatus D in response to RTS packets 56, 57 transmitted to apparatus C according to data transmission request of apparatus D, although, in fact, the media is not in use.